package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PWxLoginUserMapper;
import com.ruoyi.system.domain.PWxLoginUser;
import com.ruoyi.system.service.IPWxLoginUserService;

/**
 * 微信登录用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-28
 */
@Service
public class PWxLoginUserServiceImpl implements IPWxLoginUserService 
{
    @Autowired
    private PWxLoginUserMapper pWxLoginUserMapper;

    /**
     * 查询微信登录用户
     * 
     * @param id 微信登录用户主键
     * @return 微信登录用户
     */
    @Override
    public PWxLoginUser selectPWxLoginUserById(Long id)
    {
        return pWxLoginUserMapper.selectPWxLoginUserById(id);
    }

    /**
     * 查询微信登录用户列表
     * 
     * @param pWxLoginUser 微信登录用户
     * @return 微信登录用户
     */
    @Override
    public List<PWxLoginUser> selectPWxLoginUserList(PWxLoginUser pWxLoginUser)
    {
        return pWxLoginUserMapper.selectPWxLoginUserList(pWxLoginUser);
    }

    /**
     * 新增微信登录用户
     * 
     * @param pWxLoginUser 微信登录用户
     * @return 结果
     */
    @Override
    public int insertPWxLoginUser(PWxLoginUser pWxLoginUser)
    {
        pWxLoginUser.setCreateTime(DateUtils.getNowDate());
        return pWxLoginUserMapper.insertPWxLoginUser(pWxLoginUser);
    }

    /**
     * 修改微信登录用户
     * 
     * @param pWxLoginUser 微信登录用户
     * @return 结果
     */
    @Override
    public int updatePWxLoginUser(PWxLoginUser pWxLoginUser)
    {
        pWxLoginUser.setUpdateTime(DateUtils.getNowDate());
        return pWxLoginUserMapper.updatePWxLoginUser(pWxLoginUser);
    }

    /**
     * 批量删除微信登录用户
     * 
     * @param ids 需要删除的微信登录用户主键
     * @return 结果
     */
    @Override
    public int deletePWxLoginUserByIds(Long[] ids)
    {
        return pWxLoginUserMapper.deletePWxLoginUserByIds(ids);
    }

    /**
     * 删除微信登录用户信息
     * 
     * @param id 微信登录用户主键
     * @return 结果
     */
    @Override
    public int deletePWxLoginUserById(Long id)
    {
        return pWxLoginUserMapper.deletePWxLoginUserById(id);
    }
}
